﻿using Managistics.Warehouse.Configuration;
using Managistics.Warehouse.Controllers.Interfaces;
using Managistics.Warehouse.Views.Interfaces;
using Managistics.Warehouse.Factories;
using Managistics.Core.Services;

namespace Managistics.Warehouse.Controllers
{
    public class DashboardController : IDashboardController
    {
        /// <summary>
        /// Local instance of the configuration class that we'll end up binding to
        /// </summary>
        public ApplicationConfiguration appConfig = null;

        readonly IDashboardView dashboardView;
        readonly IMainView mainView;
        readonly ComplexParameterObject parameter;

        public DashboardController(IDashboardView dashboardView, IMainView view, ComplexParameterObject parameter)
        {
            this.dashboardView = dashboardView;
            this.mainView = view;
            this.parameter = parameter;

            // Simply assign the default config object - it gets loaded via 
            // the default constructor defined in AppConfig.cs
            this.appConfig = GlobalApp.Configuration;
        }

        public void Run()
        {
            dashboardView.Open(this.mainView);
        }

        public void Stop(string key) { }
    }
}